home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu086.dms / pu086.adf / Texts / Questions < prev    next >
Text File  |  1990-12-04  |  10KB  |  209 lines

  1.  
  2. (c) 1990 Steve Hawtin.
  3.  
  4.   Over the last few months, since the first proper version of NorthC was 
  5. released, quite a few people have written to me to ask about NorthC, 
  6. usually they also add some supplementary questions, I thought it would be 
  7. worth putting down the answer to some of these queries so that you have 
  8. to think of more interesting ones.
  9.  
  10.  
  11. 1. What books on 'C' should I buy?
  12.  
  13.   Since 'C' is the current "fashionable language" there are a vast number 
  14. of books on 'C' around, mostly written by the people who were writing 
  15. books on Artificial Intelligence a couple of years ago and know just as 
  16. much about 'C'.  If you want to buy a book on 'C' here are some that I can 
  17. recommend.
  18.  
  19.   "The C programming language" by Kernigan & Ritchie.
  20.  
  21.   If you want to learn 'C' this is the best book, it may be hard going at 
  22. first but unlike many "easy" books you will still be using after a year of 
  23. 'C' programming.  This is the book that professional 'C' programmers use 
  24. as a reference.  You will find a copy almost everywhere 'C' is used 
  25. seriously, normally dog-eared and grey from overuse.  There are two 
  26. editions of this book, the original edition and the ANSI edition, you 
  27. should not worry about which on you get, although the ANSI one is more up 
  28. to date most 'C' compilers will be closer to the old edition for some time 
  29. to come.
  30.  
  31.   "C traps and pitfalls" by Koenig
  32.  
  33.   For the experienced 'C' programmer this book is a must, it points out 
  34. many of those nice little quirks that trap everybody from time to time.  
  35. This book collects together a vast body of 'C' experience, once you know 
  36. the difference between a union and a structure this book will tell you all 
  37. the things you didn't realise you didn't know.
  38.  
  39.   "Standard C" by Plauger & Brodie
  40.  
  41.   The best book I have seen on the ANSI standard, this book is a reference 
  42. guide rather than a "how to" book.
  43.  
  44.   "Amiga ROM Kernel:Libraries & Devices" by CATS
  45.   "Amiga ROM Kernel:Includes & Autodocs" by CATS
  46.  
  47.   These two books are the complete guides for the Amiga specific bits, 
  48. most of the examples are in 'C', but you will have to get hold of the 
  49. include files.  The first book introduces AmigaDOS and gives examples of 
  50. how to do things with the machine, the second is the ultimate reference 
  51. book for Amiga specific programming.  If you are buying these make sure 
  52. you get the right version for your version of workbench, currently the 
  53. ones in the blue covers for Workbench 1.3.
  54.  
  55.  
  56. 2. Is NorthC ANSI compatible?
  57.  
  58.   The answer to this question is no, although I have tried to use ANSI 
  59. functions where I can there are still many areas where the compiler falls 
  60. short of the standard.  The "Bugs.doc" file outlines the areas that do not 
  61. conform.
  62.  
  63.   The ANSI standard clearly states that compiler writers are not allowed 
  64. to claim ANSI conformance unless they implement everything in the 
  65. standard, however this has not stopped certain companies claiming to have 
  66. ANSI 'C' compilers when they do not support multibyte characters and 
  67. locales.  As yet I have not managed to find a true ANSI 'C' compiler.
  68.  
  69.  
  70. 3. Is NorthC shareware or public domain?
  71.  
  72.   The answer to this question is no, NorthC is neither public domain or 
  73. shareware.  Shareware programs are programs that are distributed by the 
  74. public, but if you use them, or want an up to date copy, you must send 
  75. some money to the authors.  Public domain programs are programs that you 
  76. can do anything with, they belong to the public.
  77.  
  78.   Most of NorthC is copyright to the original authors, myself, Charlie 
  79. Gibbs, the Software Distillary and so on, however the copyright holder has 
  80. allowed other people, this means you, to copy their programs and data 
  81. provided you stick to certain rules.  These rules normally just say that 
  82. you are not allowed to use the stuff for commercial gain, see the 
  83. individual files on the disk to find out the full set of restrictions for 
  84. each program.
  85.  
  86.   If you feel that I deserve some money for the hard work that I have put 
  87. into this disk send £15 or $25 to your national spastics charity, they 
  88. need it more than I do.  If you feel that some of the other people that 
  89. contributed deserve some recognition please send them any money direct.
  90.  
  91.  
  92. 4. Why isn't the NorthC disk bootable?
  93.  
  94.   Well the reason for this is that I could not create a bootable disk 
  95. without including some programs by Commodore.  It is easy to create a 
  96. bootable NorthC floppy, just follow the instuctions in the file "Bootable" 
  97. in this directory.
  98.  
  99.  
  100. 5. Where do I get the AmigaDOS include files?
  101.  
  102.   You will notice that the NorthC 1.3 disk does not contain the AmigaDOS 
  103. include files, I asked Commodore if I could put them on the disk but they 
  104. refused.  To get them you can either type them in from "Includes & 
  105. Autodocs" or you can write to Commodore and ask to become a "registered 
  106. developer", this will cost about £20 in the UK, presumably a similar 
  107. amount elsewhere.  Commodore will send you the include files and various 
  108. other useful bits and pieces.  I have been told that it is well worth 
  109. doing.  See the "README" file on the NorthC disk for more details.
  110.  
  111.   Since writing the above paragraph I have also been told that Commodore UK 
  112. are charging £120 for the minimum set of software that contains the include 
  113. files, I suggest that you get in touch with Commodore and find the truth.  I 
  114. have seen copies of something that claims to be Fred Fish 23 that contains 
  115. the complete set of include files, since my listing of the FISH says that 
  116. FF23 contains the sources to microEmacs I do not believe that this is a real 
  117. PD disk.
  118.  
  119.  
  120. 6. Why do you give away your software?
  121.  
  122.   This is one of the most difficult questions I am asked, here is a 
  123. selection of answers
  124.  
  125.   0. Because its needed.
  126.   1. Because its there.
  127.   2. Because I cannot sell it.
  128.   3. For the money.
  129.   4. Because I think more Amiga users should have access to 'C'.
  130.   5. Because software should be free.
  131.   6. To encourage users to purchase Lattice C.
  132.   7. As an Erisian it is my duty to spread knowledge.
  133.   8. For the fame.
  134.   9. Just because...
  135.  
  136.   Some of these answers are true, some are false and some are meaningless, 
  137. you will have to sort them out yourself.
  138.  
  139.  
  140. 7.  How did you port NorthC
  141.  
  142.   Before I answer this question I should point out that I have written 
  143. programming languages before, in the last ten years I have written a 
  144. "Forth" interpreter, a "Scheme" interpreter and compiler, and been 
  145. professionally involved in "Common Lisp" interpreters and compilers.  So 
  146. the idea of porting a 'C' compiler was not as horrendous as it should have 
  147. been.
  148.  
  149.   When I bought my Amiga in December 1989 I assumed that I would be able 
  150. to get hold of a complete 'C' system in the public domain, in fact what I 
  151. found was
  152.  
  153.   1) Sozobon C, on FISH 171, an "almost ported" 'C' compiler.
  154.   2) SmallC, on FISH 141, a working but very limited 'C' compiler.
  155.   3) A68K, on FISH 186, a working assembler.
  156.   4) Blink, on FISH 40, a working linker.
  157.   5) SmallLib, on FISH 92, a small library for assembler programmers.
  158.  
  159. one problem with Sozobon was that the output was not compatible with any 
  160. of the Amiga public domain assemblers.  So my first step was to create a 
  161. program "convert" that read a ".s" file produced by Sozobon and converted 
  162. it into a ".asm" file that A68K could deal with.  I wrote the first 
  163. version in SmallC, this finally convinced me that SmallC was not the 
  164. language for me.  I now could compile 'C' programs in three steps,
  165.  
  166.   1) hcc test.c
  167.   2) convert test.s test.asm
  168.   3) a68k test.asm
  169.  
  170. using this I created some 'C' library functions, and used these to create 
  171. a new version of "convert".  I then ran the Sozobon compiler through this 
  172. three stage compilation process, the resulting program summoned the guru 
  173. of course.  After two months of continual work modifying the Sozobon 
  174. source I managed to get the compiler sort of working.  Once I had a 
  175. version of the compiler that could compile itself I changed the output 
  176. routines to make the "convert" program unnecessary.
  177.  
  178.   As soon as the system was stable I released it, I thought that it was 
  179. worth sending out a version that was incomplete so that people could start 
  180. to play with 'C'.  I called this first release NorthC 1.0 because the 
  181. original source has been so heavily hacked the program was sure to contain 
  182. many new and exciting bugs, this was distributed by Fred Fish on FISH 
  183. 340.  After two more months I had a version I felt happy with, I released 
  184. this at the start of May as NorthC 1.1.  Having spent almost every evening 
  185. for more than four months working on NorthC I decided to give it a rest.
  186.  
  187.   As a passing thought if I had just bought a copy of Lattice when I 
  188. started I would have saved myself a large amount of time and money.  
  189. However I would not know as much about 'C' as I now do.
  190.  
  191.  
  192. 8.  Are you trying to replace Lattice?
  193.  
  194.   In a sense the answer to this question is yes, when I first started 
  195. working on NorthC I could have got an illicit copy of Lattice and used 
  196. that to develop my 'C' programs, however I felt that it would be better to 
  197. have a legitimate 'C' compiler.  So I hope that NorthC and the other 
  198. public domain 'C' compilers will replace all the illegal copies of Lattice 
  199. that are floating about.
  200.  
  201.   Of course the Lattice compiler is a professional piece of software, the 
  202. documentation is better, and in hard copy, I would assume the code produced 
  203. is quicker and more compact, and the software support on Lattice is better.  
  204. If the size and speed of the final program matters enough to spend the 
  205. money then you should go out and buy a professional compiler.  Until that 
  206. time comes you can carry on using NorthC, any code you write using NorthC 
  207. should work in any 'C' compiler.
  208.  
  209.